package Server;

import packages.Packages;

public class ReadMailBoxThread extends Thread{
	private MailBox mail;
	private Server server;
	
	
	public ReadMailBoxThread(Server server, MailBox mail){
		this.server = server;
		this.mail = mail;
	}
	
	public void run() {
		while(!interrupted()){
			server.sendToAll(mail.getMessage(),Packages.PACKAGE_CHAT_MESSAGE);
		}
	}
}
